import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../pages/Home'
import JuYuan from '../pages/JuYuan'
import PiaoJia from '../pages/PiaoJia'
import MySelf from '../pages/MySelf'
Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/juyuan',
    name: 'juyuan',
    component: JuYuan
  },
  {
    path: '/myself',
    name: 'myself',
    component: MySelf
  },
  {
    path: '/piaojia',
    name: 'piaojia',
    component: PiaoJia
  }
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
